﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true" CodeFile="monthTicket.aspx.cs" Inherits="monthTicket" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" Runat="Server">
Danh sách vé tháng
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" Runat="Server">
<script type="text/javascript">
	$(document).ready(function () {
	    $("#tableOne").tablesorter({ debug: false, sortList: [[0, 0]], widgets: ['zebra'] })
	});          
</script>

<div align="center"><asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300"></asp:Label></div>
   
    <table id="addBar" width="930" border="0" align="center" cellpadding="0" cellspacing="0" class="margin_l30 margin_b5">
        <tr>
            <td align="left" valign="bottom">
                <%--<input type="text" id="filterBoxOne" name="filterBoxTwo" />--%>
                <table cellpadding="2" cellspacing="0">
                    <tr>
                        <td align="left">Biển số</td>
                        <td align="left">Họ và tên</td>
                         <td align="left">&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="left"><asp:TextBox ID="txtPlat" runat="server" Width="100px" TabIndex="1" /> </td>
                        <td align="left"><asp:TextBox ID="txtFullname" runat="server" Width="100px"  TabIndex="2"/> </td>
                        <td align="left"><asp:ImageButton ID="btnSearch" runat="server" 
                                ImageUrl="~/images/view.gif" ToolTip="Tìm kiếm" onclick="btnSearch_Click" /></td>
                    </tr>
                </table>
                
            </td>
            <%--<td align="left" valign="bottom">                
            </td>--%>
            <td width="90" align="right" valign="bottom" class="add2">
            <a href="monthTicketAction.aspx">Thêm mới</a>             
            </td>
        </tr>
    </table>
     <asp:Repeater ID="rptMonth" runat="server"
        onitemcommand="rptMonth_ItemCommand" 
        onitemdatabound="rptMonth_ItemDataBound">
        <HeaderTemplate>
            <table id="tableOne" class="yui margin_l30 margin_b5" width="930" border="0" align="center" cellpadding="5" cellspacing="1" >
                <thead>
                    <tr>
                        <th width="30">STT</th>
                        <th width="150" align="center" class="tableheader">Biển số</th>
                        <th align="left" class="tableheader">Tên</td>
                        <th width="100" align="center" class="tableheader">Giá tiền(VNĐ)</td>
                        <th width="100" align="center" class="tableheader">Ngày bắt đầu</th>
                        <th width="110" align="center" class="tableheader">Ngày hết hạn</th>
                        <th width="70" align="center" class="tableheader">Gia hạn</th>
                        <th width="70" align="center" class="tableheader">Kích hoạt</th>
                        <th colspan="2" align="center" class="tableheader">Thao tác</th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td align="center"><asp:Label ID="lblNo" runat="server" Text="<%# Container.ItemIndex + 1 %>"></asp:Label></td>
                <td align="center" valign="top"><b><%#Eval("PlateNumber")%></b></td>
                <td align="left" valign="top"><%#Eval("FullName")%></td>
                <td align="right" valign="top"><%#Eval("Price", "{0:0,0}")%></td>
                <td align="center" valign="top"><%#Eval("FromDate", "{0:dd/MM/yyyy}")%></td>
                <td align="center" valign="top"><%#Eval("ToDate", "{0:dd/MM/yyyy}")%></td>
                <td align="center" valign="middle" >
                    <asp:ImageButton ID="iBtnActive" ImageUrl="~/images/extendIcons.png" runat="server" CommandName="Extend" ToolTip="Click để gia hạn"  CommandArgument='<%#Eval("Id")%>' />
                </td>
                <td  align="center" valign="middle" ><asp:ImageButton ID="btnActive" ImageUrl="~/images/unactive.gif" runat="server" CommandName="Active" ToolTip="Click để kích hoạt" CommandArgument='<%#String.Format("{0};{1}",Eval("Active"),Eval("Id"))%>'/></td>
                <td width="30" align="center" valign="middle">
                <asp:ImageButton ID="btnEdit"  runat="server" ImageUrl="~/images/edit.png" ToolTip="Chỉnh sửa" Width="14" Height="13" CommandName="Edit" CommandArgument='<%#Eval("Id")%>'/>
                </td>                
                <td width="30" align="center" valign="middle">
                    <asp:ImageButton ID="btnDelete" OnClientClick="return confirm('Bạn chắc chắn muốn xóa?')" ImageUrl="~/images/delete.gif" ToolTip="Xóa" runat="server" CommandName="Delete" CommandArgument='<%#Eval("Id")%>'/>                 
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
        </tbody>
	    <tfoot>
	        <tr id="pagerOne">
	            <td colspan="10" class="tableFooter padding_t5" >
		            <img title="Trang đầu" alt="Trang đầu" src="images/first.png" class="first"/>
		            <img src="images/prev.png" class="prev" title="Trang trước" alt="Trang trước"/>
		            <input type="text" class="pagedisplay"/>
		            <img src="images/next.png" class="next" title="Trang kế" alt="Trang kế"/>
		            <img src="images/last.png" class="last" title="Trang sau cùng" alt="Trang sau cùng"/>&nbsp;&nbsp;
		            <select class="pagesize">
			            <option selected="selected"  value="10">10</option>
			            <option value="20">20</option>
			            <option value="30">30</option>
			            <option  value="40">40</option>
		            </select>
		        </td>
	        </tr>
	    </tfoot>
        </table>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>

